import Layout from '@/layout'

export default [
  {
    path: '/redirect',
    component: () => import('@/layout/index'),
    hidden: true,
    children: [
      {
        path: '/redirect/:path(.*)',
        component: () => import('@/views/redirect/index')
      }
    ]
  },
  {
    path: '/login',
    component: () => import('@/views/login/index'),
    hidden: true
  },
  // to fix
  {
    path: '*',
    component: () => import('@/layout/index'),
    redirect: '/dashboard',
    children: [
      {
        path: 'dashboard',
        component: () => import('@/views/dashboard/index'),
        name: 'Dashboard',
        meta: { title: 'dashboard', icon: 'dashboard', affix: true }
      }
    ]
  },
  // 公司设置
  {
    path: '/company-setting',
    component: () => import('@/layout/index'),
    children: [
      {
        path: 'index',
        component: () => import('@/views/company-setting/index'),
        name: 'company-setting',
        meta: { title: 'companySetting', icon: 'documentation', affix: true }
      }
    ]
  },
  // 员工
  {
    path: '/employees',
    component: () => import('@/layout/index'),
    children: [
      {
        path: 'index',
        component: () => import('@/views/employees/index'),
        name: 'employees',
        meta: { title: 'employees', icon: 'documentation', affix: true }
      }
    ]
  },
  // 社保
  {
    path: '/social-security',
    component: () => import('@/layout/index'),
    children: [
      {
        path: 'index',
        component: () => import('@/views/social-security/index'),
        name: 'social-security',
        meta: { title: 'socialSecurity', icon: 'documentation', affix: true }
      }
    ]
  },
  // 组织架构
  {
    path: '/org-sturcture',
    component: () => import('@/layout/index'),
    children: [
      {
        path: 'index',
        component: () => import('@/views/org-sturcture/index'),
        name: 'org-sturcture',
        meta: { title: 'orgSturcture', icon: 'documentation', affix: true }
      }
    ]
  },
]
